<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <!-- Bootstrap -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

    <title>用户登录</title>
    <link href="file/images/yc.png" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="file/css/login.css"/>
</head>

<body style="background-image: url(file/images/2.jpg);">
<a href="index.html"><img src="file/images/11.png" title="首页" width="600px" height="700px"></a>


<div class="box">
    <h2>用户登录</h2>
    <form name="loginForm" id="loginForm" method="POST" action="/login">
        <div class="inputBox">
            <input type="text" name="nickname" id="nickname" required=""/><label>用户名</label>
        </div>
        <div class="inputBox">
            <input type="password" name="pwd" id="pwd" required=""/><label>密码</label>
        </div>
        <div id="button-two">
            <button type="submit" value="登录" id="subLogin" class="btn btn-primary btn-lg" style="float: left;">登录</button>
    <!--        <input type="submit"  />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
            <a href="reg.html" class="btn btn-primary btn-lg active" role="button">注册</a>
        </div>

    </form>
</div>

<script src="file/js/jquery-3.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="file/js/jquery.form.min.js"></script>
<!--<script>
    $(function () {
        /*
         获取form元素，调用其ajaxForm(...)方法
         内部的function(data)的data就是后台返回的数据
        */
        $("#loginForm").ajaxForm(function (data) {
            console.log(data);
            if (data.code == 400) {
                alert(data.message);
                setTimeout(function () {
                    location.href = "index.html";
                }, 2000);
            } else if (data.code == 200) {
                alert(data.message);
                return;
            } else {
                alert("发生未知异常！");
                return;
            }
        });
    });

</script>-->
</body>
</html>